<template>
  <section class="container">
    <transition name="fade-in">
      <div class="screen">
        <div class="recycle">
          <router-link :to="{ path: '/recycle/apply', query: { cityId: areaCode }}"><img :src="require('../styles/asset/bg.png')" /></router-link>
          <router-link class="btn" :to="{ path: '/recycle/apply',query: { cityId: areaCode } }">旧车评估</router-link>
        </div>
      </div>
    </transition>
  </section>
</template>
<script>
  let filters = {
    parseURL:function(url) {
      let a = document.createElement('a');
      a.href = url;
      return {
        params: (function () {
          let ret = {},
            param = a.href.split('?')[1],
            seg = param.split('&'),
            len = seg.length,
            i = 0,
            s;
          for (; i < len; i++) {
            if (!seg[i]) {
              continue;
            }
            s = seg[i].split('=');
            ret[s[0]] = s[1];
          }
          return ret;
        })()
      }
    }
  }

  export default{
    data () {
      return {
        token:"",
        areaCode:""
      }
    },
    mounted(){
      let url = window.location.href;
      this.areaCode = filters.parseURL(url).params.cityId;
    },
    methods: {

    }
  }
</script>
<style scoped>
  @import "../styles/styles.css";
  a,p,h3{font-size: 14px;}
  .container,.screen{ position: relative; width: 100%; height: 100%; background: #f5f5f5;}
  .recycle{ position: relative; height: 100%;  overflow: scroll; background-color: #fff;}
  .recycle img{ width: 100%;}
  .recycle>a{ display: block;}
  .btn{ display: block; width: 6.6rem; margin: 0.2rem auto 0.5rem;  height: 1rem; border-radius: 0.5rem; font-weight: 500; text-align: center; line-height: 1rem; font-size: 18px; background: #48a298; color: #fff;}
</style>
